<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<link rel="stylesheet" type="text/css" href="css/base.css" />
    <base href="<%=basePath%>">
    
    <title>Editar Pasajero</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <f:view>
		<h:form>
			<h:panelGrid border="0" columns="3">
				<h:outputText value="Nombre"></h:outputText>
				<h:inputText id="nombre" value="#{ReservaDePaqueteBean.dataItem.nombre}" required="true" maxlength="20" size="20" />
				<h:message for="nombre" errorClass="error"></h:message>
				
				<h:outputText value="Apellido"></h:outputText>
				<h:inputText id="apellido" value="#{ReservaDePaqueteBean.dataItem.apellido}" required="true" maxlength="20" size="20" />
				<h:message for="apellido" errorClass="error"></h:message>

				<h:outputText value="DNI"></h:outputText>
				<h:inputText id="dni" value="#{ReservaDePaqueteBean.dataItem.dni}" required="true" maxlength="20" size="20">
					<f:convertNumber integerOnly="true" />
					<f:validateLength minimum="7" maximum="8"/>
				</h:inputText> 	
				<h:message for="dni" errorClass="error"></h:message>
				
				<h:outputText value="Telefono"></h:outputText>
				<h:inputText id="telefono" value="#{ReservaDePaqueteBean.dataItem.telefono}" required="true" maxlength="20" size="20">
						<f:convertNumber integerOnly="true" />
                		<f:validateLength minimum="7" maximum="10"/>
                </h:inputText>
				<h:message for="telefono" errorClass="error"></h:message>
				
			</h:panelGrid>
			<p>
			<h:commandButton value="Guardar" action="#{ReservaDePaqueteBean.guardarPasajero}"/>
			<h:commandButton value="Cancelar" action="#{ReservaDePaqueteBean.volver}" immediate="true" />
		</h:form>
	</f:view>
  </body>
</html>
